package com.example.batalhanaval;

import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.app.ListActivity;
import android.view.Menu;
import android.widget.ListView;

public class ListaJogadoresActivity extends ListActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_lista_jogadores);
		
		RepositorioPlayer playerDB = new RepositorioPlayer(this);
		/*List<Player>lista =  new ArrayList<Player>();
		lista = playerDB.gerarRanking();*/
		setListAdapter(new PlayerListAdapter(this,playerDB.gerarRanking()));
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.lista_jogadores, menu);
		return true;
	}

}
